﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Windows.Data;

namespace LprMiddleWare.ValueConverters
{
    class ColorConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            int i = (int) value;
            switch (i)
            {
                case 0:
                    return "蓝牌";
                case 1:
                    return "黑牌";
                case 2:
                    return "黄牌";
                case 3:
                    return "白牌";
                case 4:
                    return "黄色后牌";
                case 5:
                    return "警车";
                case 6:
                    return "普军";
                case 7:
                    return "重军";
                case 8:
                    return "武警";
                case 9:
                    return "新白牌";
                case 10:
                    return "新黄牌";
                case 11:
                    return "新黄色后牌";
                case 12:
                    return "农用车";
                case 13:
                    return "无牌";
                default:
                    return "未定义";
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
